package com.yanqu.road.server.manger.activity.gashapon;

import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.activity.gashapon.config.GashaponReward;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author : Cxp
 * @Time : 2024-10-21
 * @Description : 幸运扭蛋-配置类
 */

public class GashaponConfig {
    private String oneDrawCost; // 一次扭蛋消耗
    private int oneDrawScore; // 一次扭蛋积分获取
    private int guaranteeNum; // 保底非凡数（n次不出非凡下一次必出非凡）
    private String hiddenGuaranteeNum; // 极品品质暗保底数

    private Map<Integer, GashaponReward> rewardMap; // 奖励配置

    private ActivityInfo activityInfo;

    public GashaponConfig(ActivityInfo activityInfo) {
        this.activityInfo = activityInfo;
    }

    public int getActivityId() {
        if (this.activityInfo == null) {
            return 0;
        }
        return activityInfo.getActivityId();
    }

    public String getOneDrawCost() {
        return oneDrawCost;
    }

    public void setOneDrawCost(String oneDrawCost) {
        this.oneDrawCost = oneDrawCost;
    }

    public int getOneDrawScore() {
        return oneDrawScore;
    }

    public void setOneDrawScore(int oneDrawScore) {
        this.oneDrawScore = oneDrawScore;
    }

    public int getGuaranteeNum() {
        return guaranteeNum;
    }

    public void setGuaranteeNum(int guaranteeNum) {
        this.guaranteeNum = guaranteeNum;
    }

    public String getHiddenGuaranteeNum() {
        return hiddenGuaranteeNum;
    }

    public void setHiddenGuaranteeNum(String hiddenGuaranteeNum) {
        this.hiddenGuaranteeNum = hiddenGuaranteeNum;
    }

    public Map<Integer, GashaponReward> getRewardMap() {
        if (rewardMap == null) {
            rewardMap = new HashMap<>();
        }
        return rewardMap;
    }

    public void setRewardMap(Map<Integer, GashaponReward> rewardMap) {
        this.rewardMap = rewardMap;
    }

    public ActivityInfo getActivityInfo() {
        return activityInfo;
    }

    public void setActivityInfo(ActivityInfo activityInfo) {
        this.activityInfo = activityInfo;
    }
}
